package com.book.dao;

import com.book.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> getUserList();


    User getUserByParams(User user);


    User getUserByLogin(User user);

    User getUserByCode(String uCode);

    Integer getCountByName(String name);

    Integer getCountByPhone(String phone);

    Integer getCountByEmail(String email);

    List<String> getUserListStringPhone();
    List<String> getUserListStringName();
    List<String> getUserListStringEmail();

    Integer updatePassword(@Param("pass") String pass, @Param("uCode") String userCode);

    List<User> getUserName(@Param("ids") List<Integer> ids);
}